home *** CD-ROM | disk | FTP | other *** search
- Path: gryphon.phoenix.net!usenet
- From: "John F. Navratil" <jfn@phoenix.net>
- Newsgroups: comp.lang.c
- Subject: Re: Secure from Decompiling??
- Date: Wed, 24 Jan 1996 19:13:48 -0800
- Message-ID: <3106F56C.5D13@phoenix.net>
- References: <4djaq2$jd5@earth.superlink.net> <4e0e5iINN5qs@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: dial17.phoenix.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b3 (Win16; I)
-
- Kazimir Kylheku wrote:
- >
- > In article <4djaq2$jd5@earth.superlink.net>,
- > Bob Stewart <rstewart@mars.superlink.net> wrote:
- > > I have a compiled C program containing a string that I want no one to
- > >be able to see, even with a decompiler.
- > >
- > >Is there any thing to put in the code that can prevent it from being
- > >decompiled, or make the decompiled code unintelligle??
- >
- > Not possible. You can only make things tedious and difficult, but that will not
- > thwart a resourceful and sophisticated enemy.
- >
- > You see, the code must always be intelligible to the CPU, and the actions of a
- > CPU are neatly deterministic.
- >
- > Your program will, at some point, need to decrypt the string, and this
- > execution can be traced.
- >
- > What you can do is never decrypt the string, but this is probably useless to
- > you :)
- >
- > --
-
-
- True, no code can ever be indefinitely secure from cracking. The
- practical solution is to make it economically foolish to do so.
-
- For example, battlefield commands must resist cracking for only the time
- it takes to target the guns. Once the first round is fired, the enemy
- knows where you are shooting. In this case, a relatively inexpensive
- coding can keep large resources busy for long enough to get the job done.
-
- Banks must secure transactions for a slightly longer period of time.
-
- You haven't said what the string is, but I assume it is some "key" which
- matches some "lock" to protect unauthorized use of your program. Your
- task is to protect the key so that people will get it through an
- authorized channel. If the key is worth $20, all you have to do is put a
- $21 hurdle in the way. If the key is worth more, you must do more. You
- can easily detect simple tampering with CRCs, etc. If you must transform
- the key through some decryption process, do so in a way that the
- decrypted key is never visible. Maybe you should encrypt the lock.
- Look into trap-door functions which give you a many-to-one transformation
- from free-text to encoded text.
-
- Don't worry about someone breaking your code and reselling it. It
- requires many co-conspirators which are too easily detectable.
-
- Cheers!
-
- -- John
-